package test;
import nme.events.MouseEvent;
import nme.net.SharedObject;

/**
 * ...
 * @author liwei
 * error in html
 */

class TestSharedObject extends TestBase
{
	private var so:SharedObject;
	override public function start():Void 
	{
		super.start();
		so = SharedObject.getLocal("sotest");
		stage.addEventListener(MouseEvent.CLICK, clickhandler);
		log("click to save");
		log(getobj(so.data));
	}
	
	private function clickhandler(e:MouseEvent):Void 
	{
		log("click");
		Reflect.setField(so.data, "id", Math.random());
	}
}